import Vue from 'vue';
import App from './App';
import { router } from './router';
import store from './store';
import moment from 'moment';
import './permission'; // 权限
import global from './config/global'; //全局自定义常量文件

import 'amfe-flexible';

import Vant from 'vant';
import 'vant/lib/index.css';

//全局过滤器
Vue.filter('moment', function (value, formatString) {
  formatString = formatString || 'YYYY-MM-DD';
  return moment(value).format(formatString)
})

//fontawesome字体库
import '@/style/fontawesome/less/fontawesome.less';
import '@/style/fontawesome/less/light.less';
import '@/style/fontawesome/less/regular.less';
import '@/style/fontawesome/less/solid.less';

Vue.use(Vant);
Vue.prototype.$global = global;
Vue.prototype.$moment = moment;

import Vconsole from 'vconsole';//调试工具
new Vconsole();

new Vue({
  router,
  store,
  el: '#app',
  render: h => h(App)
});
